let formatNavigations = function (that) {
  let navigationList = []
  let activeId = ''
  let navigations = that.Store.getters.navigations[0].child
  if (that.StringUtils.isNotEmpty(that.Store.getters.navigationId)) {
    for (let main of navigations) {
      for (let superior of main.child) {
        if (!that.StringUtils.verifyTheSame(String(superior.navigationId), that.Store.getters.navigationId)) {
          continue
        }

        let index = 0
        let child = superior.child
        for (let navigation of child) {
          if (index === 0) {
            activeId = String(navigation.navigationId)
          }
          index++
          if (that.StringUtils.verifyTheSame(that.Store.getters.navigationId, String(
            navigation.navigationSuperiorId))) {
            navigationList.push(navigation)
          }
        }
      }
    }
  }
  return {
    'navigationList': navigationList,
    'activeId': activeId
  }
}
export default {
  formatNavigations
}
